﻿<?php 

require '../../frame/base.php';
//$res = $Db->table('shop')->field('name')->where('shopid',2)->fetchSql()->find();

$cateId = !empty($_REQUEST['cateId'])?$_REQUEST['cateId']:null;

if($cateId){
	$storeHot = $Db->table('zifenlei')->field('id,name,pic')->where('fenleiid',$cateId)->where('isHot',1)->select();
}else{
	$storeDefault=$Db->table('categroy')->field('cateid')->where('show_app','1')->find();
	$storeHot = $Db->table('zifenlei')->field('id,name,pic')->where('fenleiid',$cateId['cateid'])->where('isHot',1)->select();
}
$ary = array('data'=>$storeHot,'code'=>200,'msg'=>'成功');
echo json_encode($ary);